package org.cuatrovientos.hellokitty;

import java.util.Vector;


/**
 * Basket with food
 * @author david_berrade
 *
 */
public class Basket {
	
	private Vector<Food> foods;
	



public Basket(){
	foods= new Vector<Food>();
	
}	

/**
 * insert new food
 * @param food
 */
public void insertFood(Food food){
	foods.add(food);
	
}
/**
 * gives total weight
 * 
 */
public float totalWheight(){
	float total=0;
	
	for( int i =0; i<foods.size();i++){
		
		total=total+ foods.get(i).getWeight();
	}
	
	return total;
}
	

/**
 * returns a string with food data
 * 
 */

public String toString(){
	String result="";
	
	//for  each
	for (Food food: foods){
		result= result+ food.toString()+ "\n";
		
	}
return result;

}
}